﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:System="clr-namespace:System;assembly=mscorlib"
	xmlns:ViewOn="clr-namespace:ViewOn.UI.Control"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2006"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:vok="clr-namespace:ViewOn.Kernel"
    xmlns:host="clr-namespace:ViewOnCore.HostContract;assembly=ViewOnCore">

	<Style x:Key="Slider.VolumeWithEffect3.Button" TargetType="{x:Type RepeatButton}">
		<Setter Property="SnapsToDevicePixels" Value="true"/>
		<Setter Property="OverridesDefaultStyle" Value="true"/>
		<Setter Property="IsTabStop" Value="false"/>
		<Setter Property="Focusable" Value="false"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type RepeatButton}">
					<Border Background="Transparent" />
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="Slider.VolumeWithEffect3.Thumb" TargetType="{x:Type Thumb}">
		<Setter Property="SnapsToDevicePixels" Value="true"/>
		<Setter Property="OverridesDefaultStyle" Value="true"/>
		<Setter Property="Focusable" Value="false"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Thumb}">
					<Grid>
						<Grid x:Name="Ellipse">
							<Path
										  Width="9"
										  Height="16"
										  Data="M160,400 L160,310 200,280 240,310 240,400 z"
										  Stretch="Fill"
										  Fill="{DynamicResource VOGradient01}"
										  Stroke="{DynamicResource VOGradient02}">
								<Path.BitmapEffect>
									<OuterGlowBitmapEffect x:Name="HoverEffect" GlowColor="{Binding Source={x:Static host:Host.UIService}, Path=GlowColors.VOGColor10}" GlowSize="0" Noise="0" Opacity="0.5" />
								</Path.BitmapEffect>
							
						</Path>
						</Grid>
					</Grid>
					<ControlTemplate.Triggers>
						<EventTrigger RoutedEvent="Mouse.MouseEnter">
							<BeginStoryboard>
								<Storyboard>
									<Storyboard.Children>
										<DoubleAnimation To="2" Duration="00:00:00.1" Storyboard.TargetName="HoverEffect" Storyboard.TargetProperty="GlowSize" />
									</Storyboard.Children>
								</Storyboard>
							</BeginStoryboard>
						</EventTrigger>
						<EventTrigger RoutedEvent="Mouse.MouseLeave">
							<BeginStoryboard>
								<Storyboard>
									<Storyboard.Children>
										<DoubleAnimation To="0" Duration="00:00:00.1" Storyboard.TargetName="HoverEffect" Storyboard.TargetProperty="GlowSize" />
									</Storyboard.Children>
								</Storyboard>
							</BeginStoryboard>
						</EventTrigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<ControlTemplate x:Key="Slider.VolumeWithEffect3.HorizontalSlider" TargetType="{x:Type Slider}">
		<Grid>
			<TickBar
			  x:Name="TopTick"
			  Height="1"
			  Fill="#7FFF"
			  Placement="Top"
			  SnapsToDevicePixels="True"
			  Visibility="Collapsed"/>
			<Path
			  Height="12"
			  Canvas.Top="11.98"
			  Margin="4,0"
			  Data="M80,320 L560,320 560,290 80,315 z"
			  Stretch="Fill"
			  Stroke="{DynamicResource VOGradient02}"
			  Fill="{DynamicResource VOGradient01}" 
			  StrokeThickness="1">
				<!--Path.Fill>
					<LinearGradientBrush StartPoint="0.198,0.457" EndPoint="0.215,2.283">
						<GradientStop Offset="0" Color="#3000"/>
						<GradientStop Offset="0.3" Color="#407F7F7F"/>
					</LinearGradientBrush>
				</Path.Fill-->
			</Path>
			<Track x:Name="PART_Track" Height="35">
				<Track.DecreaseRepeatButton>
					<RepeatButton Command="Slider.DecreaseLarge" Style="{StaticResource Slider.VolumeWithEffect3.Button}"/>
				</Track.DecreaseRepeatButton>
				<Track.Thumb>
					<Thumb Style="{StaticResource Slider.VolumeWithEffect3.Thumb}"/>
				</Track.Thumb>
				<Track.IncreaseRepeatButton>
					<RepeatButton Command="Slider.IncreaseLarge" Style="{StaticResource Slider.VolumeWithEffect3.Button}"/>
				</Track.IncreaseRepeatButton>
			</Track>
			<TickBar
			  x:Name="BottomTick"
			  Height="1"
			  Canvas.Top="35"
			  Fill="{TemplateBinding Foreground}"
			  Placement="Bottom"
			  SnapsToDevicePixels="True"
			  Visibility="Collapsed"/>
		</Grid>

		<ControlTemplate.Triggers>
			<Trigger Property="TickPlacement" Value="TopLeft">
				<Setter TargetName="TopTick" Property="Visibility" Value="Visible"/>
			</Trigger>
			<Trigger Property="TickPlacement" Value="BottomRight">
				<Setter TargetName="BottomTick" Property="Visibility" Value="Visible"/>
			</Trigger>
			<Trigger Property="TickPlacement" Value="Both">
				<Setter TargetName="TopTick" Property="Visibility" Value="Visible"/>
				<Setter TargetName="BottomTick" Property="Visibility" Value="Visible"/>
			</Trigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>

	<Style x:Key="Slider.VolumeWithEffect3" TargetType="{x:Type Slider}">
		<Setter Property="SnapsToDevicePixels" Value="true"/>
		<Setter Property="OverridesDefaultStyle" Value="true"/>
		<Style.Triggers>
			<Trigger Property="Orientation" Value="Horizontal">
				<Setter Property="MinWidth" Value="30" />
				<Setter Property="MinHeight" Value="21" />
				<Setter Property="Template" Value="{StaticResource Slider.VolumeWithEffect3.HorizontalSlider}" />
			</Trigger>
		</Style.Triggers>
	</Style>

</ResourceDictionary>